package xiaocao.learn.java.io;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.InputStreamReader;

public class BufferedReaderExample {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {
		
		
		BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream("d:/test.txt"), "GBK"));
		//BufferedReader reader = new BufferedReader(new FileReader("d:/test.txt"));
		String s = "";
		while((s = reader.readLine()) != null) {
			System.out.println(s);
		}
		reader.close();

	}

}
